// LXH_DataIO.h: interface for the CLXH_DataIO class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_LXH_DATAIO_H__AF841F4D_BCFA_443D_98B8_7B2CAFDEB2D8__INCLUDED_)
#define AFX_LXH_DATAIO_H__AF841F4D_BCFA_443D_98B8_7B2CAFDEB2D8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "LXH_Data.h"
#include "stdio.h"
#include "fstream.h"

#define		FILE_BUF_SIZE	1000000
#define		WRITE_REC		1   // append
#define		READ_REC		2	// read

#define INFO " LE Xuan Hung, Grenoble 07-09-2003"

class CDataIO  
{
public:
	CData * GetDataRec();
	CData * GetAllRec(void);
	void CloseFile(void);
	void OpenFile(char *FName, int Mode);
	int PutData(CData &data);
	CDataIO();
	virtual ~CDataIO();

private:
	fstream DFile;
	char *FileBuf;
};

#endif // !defined(AFX_LXH_DATAIO_H__AF841F4D_BCFA_443D_98B8_7B2CAFDEB2D8__INCLUDED_)
